
<!-- link -->
<link rel="stylesheet" type="text/css" media="screen" href="/sfAdminThemejRollerPlugin/css/jquery/redmond/jquery-ui.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/sfAdminThemejRollerPlugin/css/jroller.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/sfAdminThemejRollerPlugin/css/fg.menu.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/sfAdminThemejRollerPlugin/css/fg.buttons.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/sfAdminThemejRollerPlugin/css/ui.selectmenu.css" />
<!-- Fin link -->


<!-- Debut JS -->
            <script type="text/javascript">

                function testHide(id)
                {
                        //cache le bloc ayant l'id passé en parametre
                        $("#"+id+"").slideToggle("fast");
                }

                    $(document).ready(function() {
                        $("#informationsContact").tabs();
                        $("#inscriptionsContact").tabs();
                    });
            </script>
<!-- Fin JS -->

<!-- Debut Menu permettant d'acceder aux tableaux -->
<div id="sf_admin_container">
    <div id="informationsContact" style="width: 99%; ">
        <ul>
            <li class="horizontalTabs"><a href="#searchContact"><span>Contact</span></a></li>
            <li class="horizontalTabs"><a href="#searchAtelier"><span>Atelier</span></a></li>
            <li class="horizontalTabs"><a href="#searchStage"><span>Stage</span></a></li>
            <li class="horizontalTabs"><a href="#searchCommunication"><span>Communication</span></a></li>
            <li class="horizontalTabs"s><a href="#searchGroupe"><span>Groupe</span></a></li>
            <li class="horizontalTabs"s><a href="#searchSpectacle"><span>Spectacle</span></a></li>
            <li class="horizontalTabs"s><a href="#searchTache"><span>Tache</span></a></li>
        </ul>
<!-- Fin Menu permettant d'acceder aux tableaux -->

<!-- Debut Contact -->
                        <div id="searchContact">
                            <!-- Debut Search contact JQgrid -->
                                <table id="rechercheContact"></table>
                                <div id="ptoolbar" ></div>
                               <!-- <div id="pager"></div>
                                <table id="search"></table> !-->
                        </div>
<!-- Fin Contact -->



<!-- Debut Atelier -->

                        <div id="searchAtelier">
                            <table id="rechercheAtelier"></table>
                        </div>
<!-- Fin Atelier -->

<!-- Debut Stage -->
                        <div id="searchStage">
                            <table id="rechercheStage"></table>
                        </div>
<!-- Fin Stage -->

<!-- Debut Communication -->
                       
                        <div id="searchCommunication">
                            <table id="rechercheCommunication"></table>
                        </div>
<!-- Fin Communication -->


<!-- Debut Groupe -->

                        <div id="searchGroupe">
                            <table id="rechercheGroupe"></table>
                        </div>
<!-- Fin Groupe -->


<!-- Debut Spectacle -->

                        <div id="searchSpectacle">
                            <table id="rechercheSpectacle"></table>
                        </div>
<!-- Fin Spectacle -->

<!-- Debut Tache -->

                        <div id="searchTache">
                            <table id="rechercheTache"></table>
                        </div>
<!-- Fin Tache -->

<!-- Debut Search contact JQgrid 
        <table id="list4"></table>
        <div id="gridpager"></div>-->


    <?php
    //recuperer le query

        use_javascript('jqgrid/JsonXml.js');
        use_javascript('jqgrid/jquery.jqGrid.min.js');
        use_javascript('jqgrid/jquery.searchFilter.js');
        use_javascript('jqgrid/grid.base.js');
        use_javascript('jqgrid/grid.celledit.js');
        use_javascript('jqgrid/grid.common.js');
        use_javascript('jqgrid/grid.custom.js');
        use_javascript('jqgrid/grid.formedit.js');
        use_javascript('jqgrid/grid.import.js');
        use_javascript('jqgrid/grid.inlinedit.js');
        use_javascript('jqgrid/grid.jqueryui.js');
        use_javascript('jqgrid/grid.postext.js');
        use_javascript('jqgrid/grid.setcolumns.js');
        use_javascript('jqgrid/grid.subgrid.js');
        use_javascript('jqgrid/grid.tbltogrid.js');
        use_javascript('jqgrid/grid.treegrid.js');
        use_javascript('jqgrid/jqDnR.js');
        use_javascript('jqgrid/jqModal.js');
        use_javascript('jqgrid/jquery.fmatter.js');
        use_javascript('jqgrid/ui.multiselect.js');
    ?>




    <script type="text/javascript">

      var chemin=document.location.href;//url complete
      var positEgal=chemin.indexOf("=");//donne la position du = en chiffre
      var cheminASuppr=chemin.substring(0,positEgal+1);//partie du chemin inutile
      //alert(cheminASuppr);
      chemin=chemin.replace(cheminASuppr,'');//suppression de la partie inutile
      //alert(chemin);

//contact
        jQuery("#rechercheContact").jqGrid({
            url:'contact_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Nom','Prenom','Localite','Code Postal','Commentaire'],
            colModel:[
                {name:'Nom',index:'Nom', sortable: false },
                {name:'Prenom',index:'Prenom', sortable: false},
                {name:'Localite',index:'Localite', sortable: false},
                {name:'CodePostal',index:'CodePostal', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            //pager: jQuery('#pager'),
            //pager: '#ptoolbar',
            //rowNum: 15,
            //rowList:[10,25,50,100],
            //page: 1,
            scrollOffset: 0,
            sortname: 'Nom',
            $sortorder: 'asc',
            caption: "Contact(s)",
            viewrecords: true,

            ondblClickRow: function(rowid,iRow,iCol,e){
                location.href='contact/'+rowid+'/show';
            }


        });//.navGrid("#ptoolbar",{search:true,edit:false,add:false,del:false, searchtext:"",refreshtext:""});

        //jQuery("#rechercheContact").jqGrid('navGrid','#ptoolbar',{del:false,add:false,edit:false,search:true});
        //jQuery("#rechercheContact").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false});

//atelier
jQuery("#rechercheAtelier").jqGrid({
            url:'atelier_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Libelle','Type de public','Horaires','Animateur','Commentaire'],
            colModel:[
                {name:'Libelle',index:'Libelle', sortable: false },
                {name:'Type',index:'Type', sortable: false},
                {name:'Horaires',index:'Horaires', sortable: false},
                {name:'Animateur',index:'Animateur', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            scrollOffset: 0,
            sortname: 'Libelle',
            $sortorder: 'asc',
            caption: "Atelier(s)",
            viewrecords: true,

            ondblClickRow: function(rowid,iRow,iCol,e){
                location.href='atelier/'+rowid+'/edit';
            }
        });

//stage
jQuery("#rechercheStage").jqGrid({
            url:'stage_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Libelle','Type de public','Horaires','Animateur','Commentaire'],
            colModel:[
                {name:'Libelle',index:'Libelle', sortable: false },
                {name:'Type',index:'Type', sortable: false},
                {name:'Horaires',index:'Horaires',width:465, sortable: false},
                {name:'Animateur',index:'Animateur', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            scrollOffset: 0,
            sortname: 'Libelle',
            $sortorder: 'asc',
            caption: "Stage(s)",
            viewrecords: true,

            ondblClickRow: function(rowid,iRow,iCol,e){
                location.href='stage/'+rowid+'/edit';
            }

        });


//communication
jQuery("#rechercheCommunication").jqGrid({
            url:'communication_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Objet','Type','Date','Commentaire'],
            colModel:[
                {name:'Objet',index:'Objet', sortable: false},
                {name:'Type',index:'Type', sortable: false},
                {name:'Date',index:'Date', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            scrollOffset: 0,
            sortname: 'Libelle',
            $sortorder: 'asc',
            caption: "Communication(s)",
            viewrecords: true,


            ondblClickRow: function(rowid,iRow,iCol,e){
                location.href='communication/'+rowid+'/edit';
            }
        });


//Groupe
jQuery("#rechercheGroupe").jqGrid({
            url:'groupe_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Libelle','Type','Commentaire'],
            colModel:[
                {name:'Libelle',index:'Libelle', sortable: false},
                {name:'Type',index:'Type', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            scrollOffset: 0,
            sortname: 'Libelle',
            $sortorder: 'asc',
            caption: "Groupe(s)",
            viewrecords: true,

            ondblClickRow: function(rowid,iRow,iCol,e){
                location.href='groupe/'+rowid+'/edit';
            }
        });

//Spectacle
jQuery("#rechercheSpectacle").jqGrid({
            url:'spectacle_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Titre','Type','Auteur','Commentaire'],
            colModel:[
                {name:'Titre',index:'Titre', sortable: false},
                {name:'Type',index:'Type', sortable: false},
                {name:'Auteur',index:'Auteur', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            scrollOffset: 0,
            sortname: 'Titre',
            $sortorder: 'asc',
            caption: "Spectacle(s)",
            viewrecords: true,


            ondblClickRow: function(rowid,iRow,iCol,e){
                location.href='spectacle/'+rowid+'/edit';
            }
        });

//Spectacle
jQuery("#rechercheTache").jqGrid({
            url:'tache_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Type','Date','Heure','Priorité','Commentaire'],
            colModel:[
                {name:'Type',index:'Type', sortable: false},
                {name:'Date',index:'Date', sortable: false},
                {name:'Heure',index:'Heure', sortable: false},
                {name:'Priorité',index:'Priorité', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            scrollOffset: 0,
            sortname: 'Type',
            $sortorder: 'asc',
            caption: "Tache(s)",
            viewrecords: true,

            ondblClickRow: function(rowid,iRow,iCol,e){
                location.href='tache/'+rowid+'/edit';
            }
        });

    </script>
<!-- Fin Search contact JQgrid -->

    </div>
</div>
